FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER chenli "294672668@qq.com"
EXPOSE ${PORT}
VOLUME /data0/logs
#虚拟机内存限制
ENV JAVA_INTERNAL_OPS="-Xms100M -Xmx100M "
#虚拟机GC ps+po组合,jdk8 可采用的gc ps+po ,psNew+cms,G1
ENV JAVA_INTERNAL_OPS="${JAVA_INTERNAL_OPS} -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseAdaptiveSizePolicy"
#虚拟机日志
ENV JAVA_INTERNAL_OPS="${JAVA_INTERNAL_OPS} -verbose:gc  -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=2 -XX:GCLogFileSize=5M -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
#异常
ENV JAVA_INTERNAL_OPS="${JAVA_INTERNAL_OPS} -XX:+HeapDumpOnOutOfMemoryError"

CMD java ${JAVA_OPS} ${JAVA_INTERNAL_OPS}   -Xloggc:/data0/logs/excelMerge/excelMerge.log -XX:HeapDumpPath=/data0/logs/excelMerge/excelMerge_jvm.hprof -jar /data0/package/excelMerge/excel.jar
